<%@ page language="java" import="web_package.ScalaCaller, db.User" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"%>
<jsp:useBean id="user" class="db.User" scope="session"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
<title>Insert title here</title>
</head>
<body>
	<%
		user = ScalaCaller.login(request.getParameter("email"), request.getParameter("password"));
		if(user==null){
			session.removeAttribute("user");
			%> Sorry, something is wrong with your email or password<br/>
				Please try again: <a href="home.jsp">here</a>
			<%
		}else{
			response.sendRedirect("userHome.jsp");
		}
	%>
</body>
</html>